@using Variant = MudBlazor.Variant
@using Elsa.Api.Client.Extensions
@using Elsa.Studio.Workflows.Services
@inject ILocalizer Localizer

<MudForm>
    <MudStack>
        <MudField
            Variant="@Variant.Text"
            HelperText="@Localizer["When checked, the workflow will be executed asynchronously."]"
            Margin="Margin.Dense"
            Underline="true">
            <MudCheckBox
                T="bool?"
                Label="@Localizer["Run Asynchronously"]"
                Dense="@true"
                Value="@(Activity?.GetRunAsynchronously() == true)"
                ValueChanged="OnRunAsynchronouslyChanged"
                ReadOnly="IsReadOnly" Disabled="IsReadOnly"
                />
        </MudField>
    </MudStack>
</MudForm>